<template>
  <h1>桃李不言下自成蹊</h1>
  <button @click="fetchRegion">fetchRegion</button>
  <button @click="axiosRegion">axiosRegion</button>
</template>
<script setup>
import axios from "axios";

const fetchRegion = () => {
  fetch('/area.json').then(res => {
    // console.log(res.json());
    res.json().then(regions => {
      console.log(regions)
    })
  });
};
const axiosRegion = () => {
  axios('/area.json').then(res => {
    console.log(res.data);
  });
};
</script>
<script>
export default {
  name: "Index"
}
</script>

<style scoped>

</style>